//
//  RegisterViewController.m
//  XMPPMessage
//
//  Created by 刘永杰 on 15/11/20.
//  Copyright © 2015年 刘永杰. All rights reserved.
//

#import "RegisterViewController.h"
#import "XMPPManager.h"

@interface RegisterViewController ()<XMPPStreamDelegate>
@property (weak, nonatomic) IBOutlet UITextField *userName;
@property (weak, nonatomic) IBOutlet UITextField *password;

@end

@implementation RegisterViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [[XMPPManager defaultManager].XMPPStream addDelegate:self delegateQueue:dispatch_get_main_queue()];
     // Do any additional setup after loading the view.
}

- (void)xmppStreamDidRegister:(XMPPStream *)sender
{
    NSLog(@"注册成功");
}

- (IBAction)registAction:(id)sender {
    
    [[XMPPManager defaultManager] registerWithUsetName:self.userName.text andPassword:self.password.text];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
